import java.util.Stack;

public class Test01 {
    public static void main(String[] args) {

        Stack<Integer> stack = new Stack<>();
        // 入栈
        stack.push(1);
        stack.push(2);
        stack.push(3);
        // 弹出栈顶元素
        Integer pop = stack.pop();// 返回弹出的元素 ---> 3
        Integer peek = stack.peek();// 获取栈顶元素，不删除  2
        boolean empty = stack.empty();// 是否为空

        System.out.println(stack.isEmpty());
    }
}
